<template>
	<u-modal v-model="show" :show-cancel-button	="true" :content="getTipsText" @confirm="onConfirm" confirm-color="#ff2c3c"></u-modal>
</template>

<script>
	
	export default {
		props: {
			type: Number,
			orderId: [Number, String]
		},
		data() {
			return {
				show: false
			};
		},
		methods: {
			open() {
				this.show = true
			},
			close() {
				this.show = false
			},
			async onConfirm() {
				const {
					type,
					orderId
				} = this;
				let res = null;
				this.$emit("confirm")
			},
		},
		computed: {

			getTipsText() {
				const {
					type
				} = this
				
				switch (type) {
					case 0:
						return "确认取消订单吗？"
					case 1:
						return "确认删除订单吗?"
					case 2:
						return "确认收货吗?"
					case 3:
						return "确认种金豆拿奖励?"
					case 4:
						return "确认兑换积分？积分对换后,仅限在积分商城消费,并将取消种金豆。"
				}
			}
		}
	}
</script>

<style>

</style>
